const UUID = require("uuid");

const table = {
    "user_info": {
        "user_id": {
            type:String,
            default:()=>UUID.v1()
        },
        "password": {
            type: String,
            required: true,
            minlength: 6,
            maxlength: 12,
            trim: true
        },
        "userName": {
            type: String,
            required: true,
            minlength: 2,
            maxlength: 6,
            trim: true
        },
        "create_time": {
            type: Date,
            default: ()=>{
               //与北京时间相差8 小时 = 28,800,000 =8 * 60 * 60 * 1000
                return new Date(Date.now() + 28800000);
            }
        },
        "token":String

    }
}
module.exports = table

